In my Angular project, I was having errors while trying to build a docker image. I used ng update @angular/cli @angular/core
and was able to resolve that error, and now I'm able to create a docker container of my project that is served.
However, now I cannot serve my project with ng serve
because I get the following error:
An unhandled exception occurred: compiler.getInfrastructureLogger is not a function
getInfrastructureLogger
is NOT a function I created, I'm assuming it's coming from a node mod. I've tried deleting the node_mod folder and install them again with npm install
, but I still get the same error. I've tried cleaning my npm cache and I still get the error.
I went back a couple of commits (to before I ran ng update @angular/cli @angular/core
) and then I'm able to run ng serve
with no errors, but am then unable to create my docker images. I need to be able to use containers, so I have to use ng update @angular/cli @angular/core
. But I also want to be able to serve my project as a standalone (plus it better for developing).
Does anyone have any advise on this error? Where it's coming from? Solutions?
I would really appreciate it. Thanks for any help you can give.
***To specify, I used ng update @angular/cli @angular/core --force
it was the only for me to run that command.
My project is Angular 8, node node version 12.14.
Copyright Notice:Content Author:「ineedtoknow」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59994254/error-from-ng-serve-after-running-ng-update-angular-cli-angular-core-and-u